package com.zcs.app.sketchpad

import android.os.Build
import android.os.StrictMode
import com.tencent.mmkv.MMKV
import com.zcs.app.base.BaseApplication
import com.zcs.app.base.utils.KLogUtil

class CustomApplication : BaseApplication() {
    override fun onCreate() {
        super.onCreate()
        /**
         * TODO 解决android7.0以上版本传递URI问题
         * @Modify by zzy@sxw.cn on 2018/2/8
         */
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            val builder = StrictMode.VmPolicy.Builder()
            StrictMode.setVmPolicy(builder.build())
        }
        initMMKV()
        initBugly()
    }

    private fun initBugly() {
        // 初始化Bugly
        // CrashReport.initCrashReport(applicationContext, "f02a4fa60a", BuildConfig.DEBUG)
    }

    private fun initMMKV() {
        KLogUtil.d("MMKV", "初始化MMKV")
        MMKV.initialize(this)
    }
}